import request from '../utils/request'

export default {
  // 获取所有评论留言
  getAll() {
    return request({
      url: 'comment/getAll',
      method: 'get'
    })
  },
  // 新增评论
  addComment(comment) {
    return request({
      url: 'comment/addComment',
      method: 'post',
      data: comment
    })
  },
  // 修改完成状态
  updateCompleted(id) {
    return request({
      url: `comment/updateCompleted/${id}`,
      method: 'put'
    })
  },
  // 删除留言
  deleteComment(id) {
    return request({
      url: `comment/deleteComment/${id}`,
      method: 'delete'
    })
  }
}
